import React from "react";
import { Link } from "react-router-dom";
import { Menu } from "antd";
import type { MenuProps } from "antd";

const items = [
  { label: <Link to="/">Home</Link>, key: "/" },
  { label: <Link to="/chat">Chat</Link>, key: "/chat" },
  { label: <Link to="/setting">Setting</Link>, key: "/setting" },
  { label: <Link to="/form">Form</Link>, key: "/form" },
  { label: <Link to="/todo">Todo</Link>, key: "/todo" },
];

export default function ManageMenu() {
  const onMenuItemClick: MenuProps["onClick"] = (target) => {
    console.log(target);
  };
  return (
    <Menu defaultSelectedKeys={["/"]} items={items} onClick={onMenuItemClick} />
  );
}
